package com.floreo.shopping.bo;

import com.floreo.shopping.model.Product;
import com.floreo.shopping.model.Quantity;
import com.floreo.shopping.service.ServiceFactory;

/**
 * @author merzod
 */
public class SystemBO {
    private static SystemBO instance = new SystemBO();

    public static SystemBO getInstance() {
        return instance;
    }

    private SystemBO() {
    }

    public void addProduct(Product product, Quantity quantity) {
        ServiceFactory.getInstance().getProductService().registerProduct(product);
        ServiceFactory.getInstance().getQuantityService().registerQuantities(product, quantity);
    }
}
